/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.pay;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

/**
Title:PaymentAppPayOrder
Description:΢��֧����APP֧������
���ȵ��á������������ӿڣ�
Ȼ����ñ��ӿڣ����к�̨֧�����룬����֧����Ϣ��
�����ö�ӦSDK�ķ��������뱾֧�����뷵�ص�֧����Ϣ������΢��/֧����֧��ģ�飬���֧����
 */
public class PaymentAppPayOrder extends MerchantBaseRequest{
	
	private String notify_url;
	private String trade_no;//*����ش���[��Ӧ����] ƽ̨������ˮ��,��������ƽ̨���������󷵻ص�����ƽ̨��ˮ��
	private String mer_trace;//*����ش���[��Ӧ����] �̻�֧����ˮ��,�̻�ƽ̨���ɵı�ʶ�ñ�֧�����׵���ˮ�ţ�����ˮ�����̻�ƽ̨�б���Ψһ����ˮ������Ϊ�ַ���
	private String amount;//*����ش���[��Ӧ����] ���
	private String goods_inf;//*����ش�����Ʒ��Ϣ
	private String user_ip;//*����ش����û�IP��ַ���û��ڴ�������ʱ�����û���ǰ��ʹ�û����� IP�� ����������У��
	private String remark;//��ע
	private String url = "/payment/appPayOrder";

	private String pay_trade_no;//[��Ӧ����]APP����֧��ʱ����Ҫ���뵽tradeNo(���׺�)( APP֧��ʱ��Ҫ)
	private String pay_sign;//[��Ӧ����]֧��ǩ����APP����֧������Ҫ���뵽sign(ǩ��)( APP֧��ʱ��Ҫ)
	private String order_id;//[��Ӧ����]���ص�ǰ�������̻�������
	private String mer_date;//[��Ӧ����]���ص�ǰ�����Ĵ������ڣ���ʽYYYYMMDD

	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public PaymentAppPayOrder doRequest() throws Exception {
		Message<PaymentAppPayOrder> response = UMFUtil.post(createAPIContext(), this,PaymentAppPayOrder.class);
		MerchantBaseRequest baseResult = convertResult(response, PaymentAppPayOrder.class);
		if(baseResult == null)
			return null;
		return (PaymentAppPayOrder)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getMer_trace() {
		return mer_trace;
	}

	public void setMer_trace(String mer_trace) {
		this.mer_trace = mer_trace;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getOrder_id() {
		return order_id;
	}

	public void setOrder_id(String order_id) {
		this.order_id = order_id;
	}

	public String getPay_sign() {
		return pay_sign;
	}

	public void setPay_sign(String pay_sign) {
		this.pay_sign = pay_sign;
	}

	public String getGoods_inf() {
		return goods_inf;
	}

	public void setGoods_inf(String goods_inf) {
		this.goods_inf = goods_inf;
	}

	public String getUser_ip() {
		return user_ip;
	}

	public void setUser_ip(String user_ip) {
		this.user_ip = user_ip;
	}

	public String getPay_trade_no() {
		return pay_trade_no;
	}

	public void setPay_trade_no(String pay_trade_no) {
		this.pay_trade_no = pay_trade_no;
	}

	public String getMer_date() {
		return mer_date;
	}

	public void setMer_date(String mer_date) {
		this.mer_date = mer_date;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("PaymentAppPayOrder [notify_url=");
		builder.append(notify_url);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", mer_trace=");
		builder.append(mer_trace);
		builder.append(", amount=");
		builder.append(amount);
		builder.append(", goods_inf=");
		builder.append(goods_inf);
		builder.append(", user_ip=");
		builder.append(user_ip);
		builder.append(", remark=");
		builder.append(remark);
		builder.append(", url=");
		builder.append(url);
		builder.append(", pay_trade_no=");
		builder.append(pay_trade_no);
		builder.append(", pay_sign=");
		builder.append(pay_sign);
		builder.append(", order_id=");
		builder.append(order_id);
		builder.append(", mer_date=");
		builder.append(mer_date);
		builder.append(", version=");
		builder.append(version);
		builder.append(", mer_id=");
		builder.append(mer_id);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}
}
